package com.tjsinfo.tjsoa.addresslist.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.addresslist.bo.IAddressListSystemUserBo;
import com.tjsinfo.tjsoa.addresslist.bo.IAddressListUserBo;
import com.tjsinfo.tjsoa.addresslist.vo.AddressListSystemUser;
import com.tjsinfo.tjsoa.addresslist.vo.AddressListUser;

public class toSystemUserAction extends Action{
	private IAddressListSystemUserBo AddressListSystemUserBo;
	
	public void setAddressListSystemUserBo(
			IAddressListSystemUserBo addressListSystemUserBo) {
		AddressListSystemUserBo = addressListSystemUserBo;
	}

	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		
		String user_id = request.getParameter("user_id");
		AddressListSystemUser systemUser = AddressListSystemUserBo.findByUserId(Integer.valueOf(user_id));
		
		request.setAttribute("systemUser", systemUser);
		return mapping.findForward("ok");
	}
}
